<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
  await internals.setPermission({name: 'system-wake-lock'}, 'denied',
                                location.origin, location.origin);

  return navigator.permissions.query({ name: 'system-wake-lock' }).then(status => {
    assert_class_string(status, "PermissionStatus");
    assert_equals(status.state, "denied");
  });
}, "PermissionDescriptor with name='system-wake-lock' works");
</script>
